依赖统一管理

chengzhenyu 8 years ago
parent
commit
43a26ef178
5 changed files with 27 additions and 17 deletions
  1. 5 5
      app/build.gradle
  2. BIN
      app/src/main/res/drawable-xhdpi/icon_no_data.png
  3. 4 4
      common/build.gradle
  4. 11 1
      gradle.properties
  5. 7 7
      views/build.gradle

+ 5 - 5
app/build.gradle

@@ -1,8 +1,8 @@
1 1
 apply plugin: 'com.android.application'
2 2
 
3 3
 android {
4
-    compileSdkVersion 24
5
-    buildToolsVersion "25.0.2"
4
+    compileSdkVersion COMPILE_SDK_VERSION as int
5
+    buildToolsVersion BUILD_TOOLS_VERSION as String
6 6
 
7 7
     compileOptions {
8 8
         sourceCompatibility JavaVersion.VERSION_1_7
@@ -11,8 +11,8 @@ android {
11 11
 
12 12
     defaultConfig {
13 13
         applicationId "ai.pai.client"
14
-        minSdkVersion 14
15
-        targetSdkVersion 22
14
+        minSdkVersion MIN_SDK_VERSION as int
15
+        targetSdkVersion TARGET_SDK_VERSION as int
16 16
         versionCode 1023
17 17
         versionName "1.0.23"
18 18
         buildConfigField "boolean","isDevMode","true"
@@ -74,7 +74,7 @@ android {
74 74
 dependencies {
75 75
     compile fileTree(include: ['*.jar'], dir: 'libs')
76 76
     compile project(path: ':common')
77
-    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
77
+    compile 'com.nostra13.universalimageloader:universal-image-loader:latest.integration'
78 78
     compile project(path: ':views')
79 79
     compile 'com.umeng.analytics:analytics:latest.integration'
80 80
 }

BIN
app/src/main/res/drawable-xhdpi/icon_no_data.png


+ 4 - 4
common/build.gradle

@@ -1,12 +1,12 @@
1 1
 apply plugin: 'com.android.library'
2 2
 
3 3
 android {
4
-    compileSdkVersion 24
5
-    buildToolsVersion "25.0.2"
4
+    compileSdkVersion COMPILE_SDK_VERSION as int
5
+    buildToolsVersion BUILD_TOOLS_VERSION as String
6 6
 
7 7
     defaultConfig {
8
-        minSdkVersion 14
9
-        targetSdkVersion 22
8
+        minSdkVersion MIN_SDK_VERSION as int
9
+        targetSdkVersion TARGET_SDK_VERSION as int
10 10
         versionCode 1
11 11
         versionName "1.0"
12 12
     }

+ 11 - 1
gradle.properties

@@ -15,4 +15,14 @@
15 15
 # When configured, Gradle will run in incubating parallel mode.
16 16
 # This option should only be used with decoupled projects. More details, visit
17 17
 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18
-# org.gradle.parallel=true
18
+# org.gradle.parallel=true
19
+org.gradle.daemon=true
20
+org.gradle.jvmargs=-Xmx5120M -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
21
+org.gradle.parallel=true
22
+android.useDeprecatedNdk=true
23
+org.gradle.configureondemand=true
24
+
25
+COMPILE_SDK_VERSION=24
26
+BUILD_TOOLS_VERSION=25.0.2
27
+MIN_SDK_VERSION=15
28
+TARGET_SDK_VERSION=21

+ 7 - 7
views/build.gradle

@@ -1,12 +1,12 @@
1 1
 apply plugin: 'com.android.library'
2 2
 
3 3
 android {
4
-    compileSdkVersion 24
5
-    buildToolsVersion "25.0.2"
4
+    compileSdkVersion COMPILE_SDK_VERSION as int
5
+    buildToolsVersion BUILD_TOOLS_VERSION as String
6 6
 
7 7
     defaultConfig {
8
-        minSdkVersion 14
9
-        targetSdkVersion 22
8
+        minSdkVersion MIN_SDK_VERSION as int
9
+        targetSdkVersion TARGET_SDK_VERSION as int
10 10
         versionCode 1
11 11
         versionName "1.0"
12 12
     }
@@ -14,7 +14,7 @@ android {
14 14
 
15 15
 dependencies {
16 16
     compile fileTree(include: ['*.jar'], dir: 'libs')
17
-    compile 'com.android.support:design:24.2.1'
18
-    compile 'com.android.support:support-v4:24.2.1'
19
-    compile 'com.android.support:recyclerview-v7:24.2.1'
17
+    compile 'com.android.support:design:latest.integration'
18
+    compile 'com.android.support:support-v4:latest.integration'
19
+    compile 'com.android.support:recyclerview-v7:latest.integration'
20 20
 }